import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../components/Home'
import Category from '../components/Category'
import Car from '../components/Car'
import My from '../components/My'
import GoodList from '../components/GoodList'
import GoodDetail from '../components/GoodDetail'
import Search from '../components/Search.vue'
import Log from '../components/log.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/Category',
    name: 'Category',
    component: Category
  },
  {
    path: '/Car',
    name: 'Car',
    component: Car
  },
  {
    path: '/My',
    name: 'My',
    component:My
  },
  {
    path: '/GoodList/:id',
    name: 'GoodList',
    component:GoodList
  },
  {
    path: '/GoodDetail/:id',
    name: 'GoodDetail',
    component:GoodDetail
  },
  {
	path:'/Search',
	name:'Search',
	component:Search
  },
  {
	  path:'/Log',
	  name:'Log',
	  component:Log
  }
]

const router = new VueRouter({
  mode: 'history',  //去掉url中的#
  routes
})

export default router
